<template>
  <div class="container">
    <el-dropdown>
      <div class="el-dropdown-link">
        <el-avatar :src="circleUrl"></el-avatar>
        <span style="margin: 0 0.5rem">admin</span>
        <i class="fa fa-caret-down"></i>
      </div>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item icon="fa fa-sign-out">{{$t('message.userAction.loginOut')}}</el-dropdown-item>
          <el-dropdown-item icon="fa fa-edit">{{$t('message.userAction.editPassword')}}</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>

<script lang="ts">
  import {defineComponent} from 'vue'
  export default defineComponent({
    name: "UserAvatar",
    setup(){
      return{
        circleUrl: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
      }
    },
  })
</script>

<style lang="scss" scoped>
  .container {
    margin-left: 2rem;
    .el-dropdown-link {
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }
  }
</style>
